// 定义key
const TOKENKEY = 'head-line-token'

// 保存 token
const saveTkone = tokenObj => {
  window.localStorage.setItem(TOKENKEY, JSON.stringify(tokenObj))
}
// 删除 token
const removeTkone = () => {
  window.localStorage.removeItem(TOKENKEY)
}
// 获取 token
const getTkone = () => {
  return JSON.parse(window.localStorage.getItem(TOKENKEY))
}

// 暴露
export { saveTkone, removeTkone, getTkone }
